
#include <iostream>
#include"SortAlgorithm.h"
#include<vector>
using namespace MySort;
using namespace std;

/// <summary>
/// 降序仿函数
/// </summary>
/// <typeparam name="T"></typeparam>
template <class T>
class func 
{
public:
    bool operator ()(const T& lh, const T& rh) 
    {
        return lh > rh;
    }
};

template <typename T>
bool cmp(const T& lh, const T& rh) 
{
    return lh > rh;
}

int main()
{
    std::cout << "Hello World!\n";

    int arr[] = { 10,9,8,8,6 ,11,1,1,2,0,0,0,0 };  
    char ch[] = { 'c','z','a' };
   
    //PrintArr<char>(chVec);

    //Sort<int>::BubbSort(arr, sizeof(arr) / sizeof(int));
    //Sort<int>::SelectSort(arr, sizeof(arr) / sizeof(int), func<int>());
    //Sort<int >::InsertSort(arr, sizeof(arr) / sizeof(int), func<int>());
    //Sort<int >::ShellSort(arr, sizeof(arr) / sizeof(int), cmp<int >);
    //Sort<int >::QuickSort(arr, 0, sizeof(arr) / sizeof(int));
    //Sort<int >::MergeSort(arr, 0, sizeof(arr) / sizeof(int));
    Sort<int >::HeapSort(arr, sizeof(arr) / sizeof(int), cmp<int >);
    PrintArr<int >(arr, sizeof(arr) / sizeof(int));
    //Sort<char>::BubbSort(ch, sizeof(ch) / sizeof(char));
    //Sort<char>::SelectSort(ch, sizeof(ch) / sizeof(char), func<char>());
    //Sort<char >::InsertSort(ch, sizeof(ch) / sizeof(char), cmp<char >);
    //Sort<char >::ShellSort(ch, sizeof(ch) / sizeof(char));
    //Sort<char >::QuickSort(ch, 0, sizeof(ch) / sizeof(char), cmp<char>);
    //Sort<char >::MergeSort(ch, 0, sizeof(ch) / sizeof(char), cmp<char>);
    PrintArr<char >(ch,sizeof(ch)/sizeof(char));


}

